

namespace SharpTalk.Core.Services.Contracts.Server
{
    using System.Net.Security;
    using System.ServiceModel;
    using System;
    using Requests;
    using Responses;

    [ServiceContract(Namespace = "http://SharpTalk/", ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    public interface IChatRoomServices
         : IRequestServiceBase<
            ChatRoomCreateRequest, ChatRoomCreateResponse,
            ChatRoomFindRequest, ChatRoomFindResponse,
            ChatRoomUpdateRequest, ChatRoomUpdateResponse,
            ChatRoomDeleteRequest, ChatRoomDeleteResponse>
    {

        [OperationContract(Name = "JoinChatRoom", Action = "JoinChatRoom", ReplyAction = "JoinChatRoomResponse", AsyncPattern = true)]
        IAsyncResult BeginJoinChatRoom(ChatRoomJoinRequest request, AsyncCallback callback, object state);
        ChatRoomJoinResponse EndJoinChatRoom(IAsyncResult result);

        [OperationContract(Name = "LeaveChatRoom", Action = "LeaveChatRoom", ReplyAction = "LeaveChatRoomResponse", AsyncPattern = true)]
        IAsyncResult BeginLeaveChatRoom(ChatRoomLeaveRequest request, AsyncCallback callback, object state);
        ChatRoomLeaveResponse EndLeaveChatRoom(IAsyncResult result);

        [OperationContract(Name = "GetUserList", Action = "GetUserList", ReplyAction = "GetUserListResponse", AsyncPattern = true)]
        IAsyncResult BeginGetUserList(ChatRoomUserListRequest request, AsyncCallback callback, object state);
        ChatRoomUserListResponse EndGetUserList(IAsyncResult result);
    }
   
}

